package com.ruoyi.project.inspection.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.inspection.mapper.ViProcessDataMapper;
import com.ruoyi.project.inspection.domain.ViProcessData;
import com.ruoyi.project.inspection.service.IViProcessDataService;

/**
 * 检测进度模板Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-07-17
 */
@Service
public class ViProcessDataServiceImpl implements IViProcessDataService 
{
    @Autowired
    private ViProcessDataMapper viProcessDataMapper;

    /**
     * 查询检测进度模板
     * 
     * @param id 检测进度模板ID
     * @return 检测进度模板
     */
    @Override
    public ViProcessData selectViProcessDataById(Long id)
    {
        return viProcessDataMapper.selectViProcessDataById(id);
    }

    /**
     * 查询检测进度模板列表
     * 
     * @param viProcessData 检测进度模板
     * @return 检测进度模板
     */
    @Override
    public List<ViProcessData> selectViProcessDataList(ViProcessData viProcessData)
    {
        return viProcessDataMapper.selectViProcessDataList(viProcessData);
    }

    /**
     * 新增检测进度模板
     * 
     * @param viProcessData 检测进度模板
     * @return 结果
     */
    @Override
    public int insertViProcessData(ViProcessData viProcessData)
    {
        viProcessData.setCreateTime(DateUtils.getNowDate());
        return viProcessDataMapper.insertViProcessData(viProcessData);
    }

    /**
     * 修改检测进度模板
     * 
     * @param viProcessData 检测进度模板
     * @return 结果
     */
    @Override
    public int updateViProcessData(ViProcessData viProcessData)
    {
        return viProcessDataMapper.updateViProcessData(viProcessData);
    }

    /**
     * 批量删除检测进度模板
     * 
     * @param ids 需要删除的检测进度模板ID
     * @return 结果
     */
    @Override
    public int deleteViProcessDataByIds(Long[] ids)
    {
        return viProcessDataMapper.deleteViProcessDataByIds(ids);
    }

    /**
     * 删除检测进度模板信息
     * 
     * @param id 检测进度模板ID
     * @return 结果
     */
    @Override
    public int deleteViProcessDataById(Long id)
    {
        return viProcessDataMapper.deleteViProcessDataById(id);
    }
}
